var order = ['red', 'yellow', 'blue', 'green', 'red'];
var navdata = getApp().globalData.nav;
var webconfig = getApp().globalData.webconfig;
Page({
  data: {
    slide:[
      {
        imgUrls: 'http://123.56.86.203/static/img/food4.jpg',
        text:'美味的热狗汉堡'
      },
      {
        imgUrls: 'http://123.56.86.203/static/img/food5.jpg',
        text: '美味的鸡腿'
      },
      {
        imgUrls: 'http://123.56.86.203/static/img/food6.jpg',
        text: '美味的香蕉'
      },
    ],
    navdata: navdata,
    webconfig: webconfig,
    indicatorDots: true,
    autoplay: true,
    interval: 3000,
    duration: 1000,
    news:[
      {
        imgurl:'http://123.56.86.203/static/img/food7.jpg',
        title:'标题一',
        text:'这是一段文本这是一段文本这是一段文本这是一段文本这是一',
        post:'22跟帖'
      },
      {
        imgurl: 'http://123.56.86.203/static/img/food8.jpg',
        title: '标题二',
        text: '这是一段文本这是一段文本这是一段文本这是一段文本这是一',
        post: '30跟帖'
      },
      {
        imgurl: 'http://123.56.86.203/static/img/food9.jpg',
        title: '标题三',
        text: '这是一段文本这是一段文本这是一段文本这是一段文本这是一',
        post: '38跟帖'
      }     
    ],
  },
  changeIndicatorDots: function (e) {
    this.setData({
      indicatorDots: !this.data.indicatorDots
    })
  },
  changeAutoplay: function (e) {
    this.setData({
      autoplay: !this.data.autoplay
    })
  },
  intervalChange: function (e) {
    this.setData({
      interval: e.detail.value
    })
  },
  durationChange: function (e) {
    this.setData({
      duration: e.detail.value
    })
  },
  onTap:function(index){
    wx.navigateTo({
      url:'../article/article',
    });
  }
})